package director;

import structural.composite.AbstractEquip;
import structural.composite.Equip;
import structural.composite.EquipPart;

public class CompositeDirector {

    public static void main(String[] args){
        //构建机器人对象
        AbstractEquip robot = new Equip("机器人1号","安川");
        AbstractEquip controller = new EquipPart("控制器","安川");
        AbstractEquip executor = new EquipPart("执行器","安川");

        robot.addChild(controller).addChild(executor);
        //打印机器人对象
        robot.print();
    }
}
